Skip to content
This repository has been archived by the owner on Feb 11, 2025. It is now read-only.

Removing leading newline in code block #117

Merged
merged 2 commits into from
May 25, 2020
Merged

Conversation

spier
Copy link
Contributor

@spier spier commented May 18, 2020

This ain't a biggie but I was trying to fix a little formatting problem in the README.
However not sure if my change has the desired effect?

Here the thing that I am trying to fix:

leading-newline

Proposed Changes

  • minor formatting issue in the README

Description

Checklist

  • Read the CONTRIBUTING document.
  • Read the CODE OF CONDUCT document.
  • Add tests to cover changes.
  • Ensure your code follows the code style of this project.
  • Ensure CI and all other PR checks are green OR
    • Code compiles correctly.
    • Created tests which fail without the change (if possible).
    • All new and existing tests passed.
  • Add your changes to Unreleased section of CHANGELOG.
  • Improve and update the README (if necessary).
  • Ensure documentation is up-to-date. The same file will be updated in plugin index when your PR is accepted, so it will be available for end-users at http://plugins.drone.io.

kakkoyun
kakkoyun previously approved these changes May 18, 2020
Copy link
Contributor

@kakkoyun kakkoyun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -219,8 +219,8 @@ $ docker run --rm \
## Development

[embedmd]:# (tmp/make_help.txt)
Copy link
Contributor Author

@spier spier May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kakkoyun what does this do? I wonder if this has to do with the extra newline that I am seeing ahead of this code block.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably that's the reason. This an annotation for a tiny program (https://github.com/campoy/embedmd) that we run to embed code pieces or generated things into markdown files. It's quite handy. Especially for the dynamic content. You can find the detailed usage in the Makefile.

drone-cache/Makefile

Lines 66 to 68 in 3172b74

tmp/make_help.txt: Makefile
-mkdir -p tmp
$(Q) awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make <target>\n\nTargets:\n"} /^[a-zA-Z_-]+:.*?##/ { printf " %-15s\t %s\n", $$1, $$2 }' $(MAKEFILE_LIST) &> tmp/make_help.txt

Copy link
Contributor

@kakkoyun kakkoyun May 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think if you remove the leading \n in printf statement, it should work.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. It doesn't look like we are generating any dynamic help text here at all, are we?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed the \n now as you suggested.

However I don't understand how this is working.
I ran make README.md however that lead to a duplicate code block in the ## Development section.

You see me a bit confused :)

@kakkoyun
Copy link
Contributor

CI is broken because of an unrelated issue https://github.com/meltwater/drone-cache/pull/119/files#r429900969.
So merging this one.

@kakkoyun kakkoyun merged commit a2c2970 into master May 25, 2020
@kakkoyun kakkoyun deleted the readme-formatting-fix branch May 25, 2020 16:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants